<div class="bf-deviceinfo">
  <!--确认弹窗-->
  <p-confirmDialog acceptLabel="确认" rejectLabel="取消"></p-confirmDialog>
  <!--消息提示-->
  <p-messages  [closable]="true" [style]="{'position':'fixed','left': '10vw','top': '0','margin-top': '0','width': '100vw','z-index':'9999'}"></p-messages>
  <!--顶部按钮-->
  <div class="bf-deviceinfo-header">
    <div class=" ui-g-4">
      <div class="ui-g-1 bf-deviceinfo-header-btn bf-deviceinfo-header-btn-add" (click)="deviceinfoAddClick()">
        <img class="bf-deviceinfo-header-img-add" src="assets/images/ic_add.png" alt="">
        <span>增 加</span>
      </div>
      <div class="ui-g-1 bf-deviceinfo-header-btn bf-deviceinfo-header-btn-modify" (click)="deviceinfoModifyClick()">
        <img class="bf-deviceinfo-header-img-modify" src="assets/images/ic_modify.png" alt="">
        <span>修 改</span>
      </div>
      <div class="ui-g-1 bf-deviceinfo-header-btn bf-deviceinfo-header-btn-delete" (click)="deviceinfoDeleteClick()">
        <img class="bf-deviceinfo-header-img-delete" src="assets/images/ic_delete.png" alt="">
        <span>删 除</span>
      </div>
    </div>
    <!--搜索-->
    <div class="ui-inputgroup bf-deviceinfo-header-btn-search">
      <input type="text" pInputText placeholder="请输入地块号" #input>
      <span class="ui-inputgroup-addon" (click)="deviceinfoSearchClick()"><i class="fa fa-search"></i></span>
    </div>
  </div>
  <!--表格-->
  <div class="bf-deviceinfo-table">
    <p-scrollPanel [style]="{width:'100%',height: '90%'}" styleClass="custombar">
      <p-table [columns]="deviceinfoTableTitle" [value]="deviceinfoTableContent"  [(selection)]="deviceinfoSelect" dataKey="eventId" (onRowSelect)="deviceinfoonRowSelect($event)">
        <ng-template pTemplate="header" let-columns>
          <tr >
            <th style="width: 3em"  [ngStyle]="this.deviceinfoTableTitleStyle">
              <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
            </th>
            <th *ngFor="let col of columns"  [ngStyle]="this.deviceinfoTableTitleStyle">
              {{col.header}}
            </th>
          </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=1" [ngStyle]="{'background':'#2E3037','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=0" [ngStyle]="{'background':'#33353C','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
        </ng-template>
      </p-table>
    </p-scrollPanel>

  </div>
  <!--增加弹窗-->
  <p-dialog header="信息添加" [(visible)]="deviceinfoAddDialog">
    <!--Content-->
    <div class="ui-g ui-fluid">
      <div class="ui-g-4">
        <label for="add">项目名称</label>
        <input type="text" pInputText placeholder="请输入地块号">
      </div>
      <div class="ui-g-4">
        <label for="add">地块名称</label>
        <input id="add" type="text" pInputText placeholder="请输入地块号">
      </div>
      <div class="ui-g-4">
        <label for="add">录入时间</label>
        <input type="text" pInputText placeholder="请输入地块号">
      </div>
      <div class="ui-g-4">
        <label for="add">操作人</label>
        <input type="text" pInputText placeholder="请输入地块号">
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button class="bf-deviceinfo-dialog-Btn bf-deviceinfo-dialog-Btn-sure" (click)="deviceinfoAddSureClick()">确认</button>
        <button class="bf-deviceinfo-dialog-Btn bf-deviceinfo-dialog-Btn-false"  (click)="deviceinfoAddDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <!--修改弹窗-->
  <p-dialog header="信息修改" [(visible)]="deviceinfoModifayDialog">
    <!--Content-->
    <div class="ui-g ui-fluid">
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modify">收费项目</label>
        </div>
        <div class="ui-g-8">
          <input id="modify" type="text" pInputText placeholder="请输入地块号">
        </div>
      </div>
      <div class="ui-g-6">
        <label for="modify">收费项目</label>
        <input type="text" pInputText placeholder="请输入地块号">
      </div>
      <div class="ui-g-6">
        <label for="modify">收费项目</label>
        <input type="text" pInputText placeholder="请输入地块号">
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button pButton class="ui-button-success" (click)="deviceinfoModifySureClick()">确认</button>
        <button pButton  (click)="deviceinfoModifayDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>

</div>
